// Just a mock data

// export const constantRoutes = [
//   {
//     path: '/redirect',
//     component: 'layout/Layout',
//     hidden: true,
//     children: [
//       {
//         path: '/redirect/:path*',
//         component: 'views/redirect/index'
//       }
//     ]
//   },
//   {
//     path: '/login',
//     component: 'views/login/index',
//     hidden: true
//   },
//   {
//     path: '/auth-redirect',
//     component: 'views/login/auth-redirect',
//     hidden: true
//   },
//   {
//     path: '/404',
//     component: 'views/error-page/404',
//     hidden: true
//   },
//   {
//     path: '/401',
//     component: 'views/error-page/401',
//     hidden: true
//   },
//   {
//     path: '',
//     component: 'layout/Layout',
//     redirect: 'dashboard',
//     children: [
//       {
//         path: 'dashboard',
//         component: 'views/dashboard/index',
//         name: 'Dashboard',
//         meta: { title: 'Dashboard', icon: 'dashboard', affix: true }
//       }
//     ]
//   },
//   {
//     path: '/documentation',
//     component: 'layout/Layout',
//     children: [
//       {
//         path: 'index',
//         component: 'views/documentation/index',
//         name: 'Documentation',
//         meta: { title: 'Documentation', icon: 'documentation', affix: true }
//       }
//     ]
//   },
//   {
//     path: '/guide',
//     component: 'layout/Layout',
//     redirect: '/guide/index',
//     children: [
//       {
//         path: 'index',
//         component: 'views/guide/index',
//         name: 'Guide',
//         meta: { title: 'Guide', icon: 'guide', noCache: true }
//       }
//     ]
//   }
// ]


export const constantRoutes = [
  {
    rId:'-1',
    path: '/login',
    component:'views/login/index',
    hidden: true
  },

  {
    rId:'-1',
    path: '/404',
    component: '/404',
    hidden: true
  },

  //-----校务管理
  {

    path: '/schoolmgt',
    component:'layout/Layout',
    meta: { title: '校务管理', icon: 'school' },
    children: [
      {
        path: 'students',
        name: 'Students',
        component:'views/schoolmgt/students',
        meta: { title: '学生信息', icon: 'students' }
      },
      {
        path: 'teachers',
        name: 'Teachers',
        component: 'views/schoolmgt/teachers',
        meta: { title: '教师管理', icon: 'teachers' }
      },
      {
        path: 'grade',
        name: 'Grade',
        component:'views/schoolmgt/grade',
        meta: { title: '年级管理', icon: 'grade' }
      },
      // {
      //   path: 'classmgt',
      //   name: 'Classmgt',
      //   component: 'views/schoolmgt/classmgt',
      //   meta: { title: '班级管理', icon: 'form' }
      //
      // }
    ]
  },

  //-----视频管理
  {
    path: '/videomgt',
    component:  'layout/Layout',
    children: [
      {
        path: 'index',
        name: 'Videomgt',
        component: 'views/videomgt/index2',
        // path: 'http://ys.vlab2.chinamcloud.com/',
        meta: { title: '视频管理', icon: 'link' }
      }
    ]
  },


  //-----系统管理
  {
    path: '/basicmgt',
    component:  'layout/Layout',
    meta: { title: '系统管理', icon: 'nested' },
    children: [
      {
        path: 'usermgt',
        name: 'Usermgt',
        component: 'views/basicmgt/usermgt',
        // component: Layout,
        meta: { title: '用户管理', icon: 'peoples' },
        children: [
          {
            path: 'consumer',
            name: 'Consumer',
            component: 'views/basicmgt/usermgt/consumer',
            meta: { title: '用户列表', icon: 'user' }
          },

        ]
      }
    ]

  },


  //微门户

  {
    path: '/viewmin',
    component:  'layout/Layout',
    children: [
      {
        path: 'index',
        name: 'Viewmin',
        component: 'views/viewmin/index',
        //path: 'https://panjiachen.github.io/vue-element-admin-site/#/',
        meta: { title: '微门户', icon: 'component' }
      }
    ]
  },


  //-----统计分析
  {
    path: '/klmb',
    component:  'layout/Layout',
    redirect: '/',
    name: 'KLMB',
    meta: { title: 'KLMB', icon: 'example' },
    children: [
      {
        path: 'index',
        component: 'views/klmb/index',
        meta: { title: '统计分析' }
      },
    ]
  },

  // 404 page must be placed at the end !!!
  { path: '*', redirect: '/404', hidden: true },


]

export const asyncRoutes = [
  //-----租户管理
  {
    path: '',
    component: 'layout/Layout',
    redirect: '/tenant',
    children: [{
      path: 'tenant',
      name: 'Tenant',
      component: 'views/tenant/index',
      meta: { title: '租户管理', icon: 'dashboard' ,roles: ['editor']}
    }]
  },

//-----系统管理
  {
    path: '/basicmgt',
    component:  'layout/Layout',
    meta: { title: '系统管理', icon: 'nested' },
    children: [
      {
        path: 'base',
        name: 'Base',
        component: 'views/basicmgt/base/index',
        meta: {  title: '基础配置', icon: 'tree' }
      },
      {
        path: 'order',
        name: 'Order',
        component: 'views/basicmgt/order/order',
        meta: {  title: '套餐设置', icon: 'money' }
      },
      {
        path: 'usermgt',
        name: 'Usermgt',
        component: 'views/basicmgt/usermgt',
        meta: { title: '用户管理', icon: 'peoples' },
        children: [
          {
            path: '/role',
            name: 'Role',
            component:'views/permission/role',
            meta: { title: '角色管理', icon: 'lock' }
          },
          {
            path: 'consumer',
            name: 'Consumer',
            component: 'views/basicmgt/usermgt/consumer',
            meta: { title: '用户列表', icon: 'user' }
          },

        ]
      }
    ]
  },





]
